﻿<navigation:Page xmlns:inputToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit" x:Class="WellDone.MenuItems" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"                 
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="1050" mc:Ignorable="d" 
           Title="Menu Items Page" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" 
           Style="{StaticResource PageStyle}" Loaded="Page_Loaded" Height="375">
    <Grid x:Name="LayoutRoot" Background="White" Margin="0,0,0,0" Height="412" VerticalAlignment="Top">
        <sdk:TabControl Margin="5,10,10,10">
            <sdk:TabItem Header="Groups" Height="26" VerticalAlignment="Top">
                <StackPanel Margin="0,0,0,0" Orientation="Vertical">
                    <Grid x:Name="LayoutGroup" Margin="2,2,1,7" Height="320">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="80*" />
                            <RowDefinition Height="10*" />
                            <RowDefinition Height="auto" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="108*"/>
                            <ColumnDefinition Width="751*"/>
                            <ColumnDefinition Width="163*"/>
                        </Grid.ColumnDefinitions>
                        <ListBox x:Name="lbMenuGroups" Grid.Row="0" HorizontalAlignment="Left" Height="250" Margin="0,10,0,0" VerticalAlignment="Top" Width="280" Grid.ColumnSpan="2"/>
                        <Button x:Name="btnUpMenuGroup" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Left" Margin="300,95,0,0" VerticalAlignment="Top" Width="31" RenderTransformOrigin="-4.847,1.239" Height="31" Click="btnUpMenuGroup_Click">
                            <Path Fill="Black" Data="M 0 6 L 12 6 L 6 0 Z"/>
                        </Button>
                        <Button x:Name="btnDownMenuGroup" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Left" Margin="300,140,0,0" VerticalAlignment="Top" Width="31" RenderTransformOrigin="0.5,0.5" Height="31" Click="btnDownMenuGroup_Click">
                            <Path Fill="Black" Data="M 0 0 L 6 6 L 12 0 Z"/>
                        </Button>
                        <Button x:Name="btnAddMenuGroup" Grid.Row="1" Content="Add" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" Width="100" Height="31" Click="btnAddMenuGroup_Click" Grid.Column="0"/>
                        <Button x:Name="btnRemoveMenuGroup" Grid.Row="1" Content="Remove"  HorizontalAlignment="left" Margin="115,5,0,0" VerticalAlignment="Top" Width="100" Height="31" Grid.Column="0" Click="btnRemoveMenuGroup_Click"/>
                        <Button x:Name="btnEditMenuGroup" Grid.Row="1" Grid.Column="0" Content="Edit" HorizontalAlignment="Left" Margin="230,5,0,0" VerticalAlignment="Top" Width="100" Height="31" Click="btnEditMenuGroup_Click"/>
                    </Grid>
                </StackPanel>
            </sdk:TabItem>
            <sdk:TabItem Header="Categories" Height="26" VerticalAlignment="Bottom" >
                <StackPanel Margin="0,0,0,0" Orientation="Vertical">
                    <Grid x:Name="LayoutCategory" Margin="2,2,1,7" Height="320">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="80*" />
                            <RowDefinition Height="10*" />
                            <RowDefinition Height="auto" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="79*"/>
                            <ColumnDefinition Width="15*"/>
                        </Grid.ColumnDefinitions>
                        <ListBox x:Name="lbMenuCategories" Grid.Row="0" HorizontalAlignment="Left" Height="250" Margin="0,10,0,0" VerticalAlignment="Top" Width="280" SelectionChanged="lbMenuCategories_SelectionChanged" Grid.ColumnSpan="2"/>
                        <Button x:Name="btnUpMenuCategory" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Left" Margin="300,95,0,0" VerticalAlignment="Top" Width="31" RenderTransformOrigin="-4.847,1.239" Height="31" Click="btnUpMenuCategory_Click">
                            <Path Fill="Black" Data="M 0 6 L 12 6 L 6 0 Z"/>
                        </Button>
                        <Button x:Name="btnDownMenuCategory" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Left" Margin="300,140,0,0" VerticalAlignment="Top" Width="31" RenderTransformOrigin="0.5,0.5" Height="31" Click="btnDownMenuCategory_Click">
                            <Path Fill="Black" Data="M 0 0 L 6 6 L 12 0 Z"/>
                        </Button>
                        <Button x:Name="btnAddMenuCategory" Grid.Row="1" Content="Add" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" Width="100"  Click="btnAddMenuCategory_Click" Height="31"/>
                        <Button x:Name="btnRemoveMenuCategory" Grid.Row="1" Content="Remove"  HorizontalAlignment="left" Margin="120,5,0,0" VerticalAlignment="Top" Width="100" Click="btnRemoveMenuCategory_Click" Height="31" Grid.ColumnSpan="3"/>
                        <Button x:Name="btnEditMenuCategory" Grid.Row="1" Grid.Column="0" Content="Edit" HorizontalAlignment="Left" Margin="240,5,0,0" VerticalAlignment="Top" Width="100" Click="btnEditMenuCategory_Click" Height="31"/>
                        <!--<CheckBox x:Name="cbMenuCategoryVisible" Grid.Row="2" Content="Visible" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" Padding="3,-3,0,0" Height="16" Width="100" Grid.ColumnSpan="3"/>
                        <Button x:Name="btnUpdateMenuCategory" Grid.Row="2"  Content="Update" HorizontalAlignment="Left" Margin="120,5,0,0" VerticalAlignment="Top" Width="100" Click="btnUpdateMenuCategory_Click" Height="31"/>-->
                    </Grid>
                </StackPanel>
            </sdk:TabItem>
            <sdk:TabItem Header="Items" Height="26" VerticalAlignment="Top">
                <StackPanel Orientation="Vertical" Margin="0,0,0,0">
                    <Grid x:Name="LayoutItems" Margin="2,2,1,7" ScrollViewer.HorizontalScrollBarVisibility="Auto">
                        <Grid.RowDefinitions>
                            <RowDefinition/>
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition  Height="80"/>
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="520"/>
                            <ColumnDefinition Width="80*"/>
                        </Grid.ColumnDefinitions>
                        <sdk:Label x:Name="lblShortName" Grid.Row="0" Grid.Column="0"  HorizontalAlignment="Left" Height="18" Margin="360,0,0,0" VerticalAlignment="Top" Width="74" Content="Short Name"/>
                        <ComboBox x:Name="cmbMenuItems" Grid.Row="1" HorizontalAlignment="Left" Margin="10,5,0,0" VerticalAlignment="Top" Width="320" SelectionChanged="cmbMenuItems_SelectionChanged" Height="27"/>
                        <TextBox x:Name="tbShortName" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Left" Height="35" Margin="360,0,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="147" MaxLength="15" Grid.ColumnSpan="2"/>
                        <Button x:Name="btnAddMenuItem" Grid.Row="2" Content="Add" HorizontalAlignment="Left" Margin="10,5,0,0" VerticalAlignment="Top" Width="70" Click="btnAddMenuItem_Click" Height="31"/>
                        <Button x:Name="btnRemoveMenuItem" Grid.Row="2" Content="Remove" HorizontalAlignment="Left" Margin="90,5,0,0" VerticalAlignment="Top" Width="70" Click="btnRemoveMenuItem_Click" Height="31"/>
                        <Button x:Name="btnEditMenuItem" Grid.Row="2" Content="Edit" HorizontalAlignment="Left" Margin="170,5,0,0" VerticalAlignment="Top" Width="70" Click="btnEditMenuItem_Click" Height="31"/>
                        <Button x:Name="btnCopyMenuItem" Grid.Row="2" Content="Copy" HorizontalAlignment="Left" Margin="250,5,0,0" VerticalAlignment="Top" Width="70" Click="btnCopyMenuItem_Click" Height="31"/>
                        <sdk:Label x:Name="lblPrice" Grid.Row="2" Grid.Column="0"  HorizontalAlignment="Left" Height="19" Margin="380,5,0,0" VerticalAlignment="Top" Width="28" Content="Price" RenderTransformOrigin="0.586,-0.343"/>
                        <TextBox x:Name="tbPrice" Grid.Row="2" Grid.Column="0"  HorizontalAlignment="Left" Height="35" Margin="420,5,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="87" Grid.ColumnSpan="2"/>
                        <sdk:Label x:Name="lblMenuCategory" Grid.Row="3" HorizontalAlignment="Left" Height="17" Margin="10,13,0,0" VerticalAlignment="Top" Width="84" Content="Menu Category"/>
                        <ComboBox x:Name="cmbMenuCategory" Grid.Row="3" HorizontalAlignment="Left" Margin="120,10,0,0" VerticalAlignment="Top" Width="210" Height="27"/>
                        <CheckBox x:Name="cbEnabled" Grid.Row="3"  Content="Enabled" HorizontalAlignment="Left" Margin="380,5,0,0" VerticalAlignment="Top" Padding="3,-3,0,0" Width="100" Height="16" Grid.ColumnSpan="2" />
                        <sdk:Label x:Name="lblMenuItemDescription" Grid.Row="4" HorizontalAlignment="Left" VerticalAlignment="Top" Height="18" Margin="10,10,0,0" Width="89" Content="Description"/>
                        <TextBox x:Name="tbDescription" Grid.Row="5" HorizontalAlignment="Left" VerticalContentAlignment="Top" Height="112" Margin="10,5,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="480" VerticalScrollBarVisibility="Auto" MaxLength="250" Grid.ColumnSpan="2" />
                        <CheckBox x:Name="cbRecipe" Grid.Row="6" Content="Recipe" HorizontalAlignment="Left" Margin="10,5,0,0" Padding="3,-3,0,0" VerticalAlignment="Top" Checked="cbRecipe_Checked" Unchecked="cbRecipe_Unchecked" Height="16" Width="100"/>
                        <ComboBox x:Name="cmbRecipe" Grid.Row="6" HorizontalAlignment="Left" Margin="80,5,0,0" VerticalAlignment="Top" Width="179" Height="27"/>
                        <Button x:Name="btnOptions" Grid.Row="6"  Content="Options" HorizontalAlignment="Left" Margin="270,5,0,0" VerticalAlignment="Top" Width="100" Click="btnOptions_Click" Height="31"/>
                        <Button x:Name="btnUpdateMenuItem" Grid.Row="6"  Content="Update" HorizontalAlignment="Left" Margin="380,5,0,0" VerticalAlignment="Top" Width="100" Click="btnUpdateMenuItem_Click" Grid.ColumnSpan="2" Height="31"/>
                        <sdk:Label x:Name="lblTimeSensitive" Grid.Row="0" Grid.Column="1"  HorizontalAlignment="Left" Height="18" Margin="20,0,0,0" VerticalAlignment="Top" Width="130" Content="Time Sensitive Pricing"/>
                        <sdk:DataGrid x:Name="dgTimeSlice" SelectionMode="Single" AutoGenerateColumns="False" HorizontalAlignment="Left" Height="270" Margin="20,0,0,0" VerticalAlignment="Top" Width="480" Grid.Column="1" Grid.Row="1" Grid.RowSpan="5">
                            <sdk:DataGrid.ColumnHeaderStyle>
                                <Style  TargetType="sdk:DataGridColumnHeader" >
                                    <Setter Property="FontSize" Value="10" />
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate>
                                                <Grid Name="Root">
                                                    <VisualStateManager.VisualStateGroups>
                                                        <VisualStateGroup x:Name="CommonStates">
                                                            <VisualStateGroup.Transitions>
                                                                <VisualTransition GeneratedDuration="00:00:0.1" />
                                                            </VisualStateGroup.Transitions>
                                                            <VisualState x:Name="Normal" />
                                                            <VisualState x:Name="MouseOver" />
                                                        </VisualStateGroup>
                                                    </VisualStateManager.VisualStateGroups>
                                                    <Grid.RowDefinitions>
                                                        <RowDefinition Height="*" />
                                                        <RowDefinition Height="*" />
                                                        <RowDefinition Height="Auto" />
                                                    </Grid.RowDefinitions>
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="Auto" />
                                                        <ColumnDefinition Width="*" />
                                                    </Grid.ColumnDefinitions>

                                                    <Rectangle x:Name="BackgroundRectangle" Stretch="Fill" Fill="#FF1F3B53" Grid.ColumnSpan="2" Grid.RowSpan="2"/>

                                                    <Rectangle x:Name="BackgroundGradient" Stretch="Fill" Grid.ColumnSpan="2" Grid.RowSpan="2">
                                                        <Rectangle.Fill>
                                                            <LinearGradientBrush StartPoint=".7,0" EndPoint=".7,1">
                                                                <GradientStop Color="#FFFFFFFF" Offset="0.015" />
                                                                <GradientStop Color="#F9FFFFFF" Offset="0.375" />
                                                                <GradientStop Color="#E5FFFFFF" Offset="0.6" />
                                                                <GradientStop Color="#C6FFFFFF" Offset="1" />
                                                            </LinearGradientBrush>
                                                        </Rectangle.Fill>
                                                    </Rectangle>

                                                    <ContentPresenter
                        Grid.RowSpan="2"
                        
                        Cursor="{TemplateBinding Cursor}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>

                                                    <Rectangle Name="VerticalSeparator" Grid.RowSpan="2" Grid.Column="2" Width="1" VerticalAlignment="Stretch" />

                                                    <Path Grid.RowSpan="2" Name="SortIcon" RenderTransformOrigin=".5,.5" HorizontalAlignment="Left" VerticalAlignment="Center" Opacity="0" Grid.Column="1" Stretch="Uniform" Width="8" Data="F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z ">
                                                        <Path.Fill>
                                                            <SolidColorBrush Color="#FF444444" />
                                                        </Path.Fill>
                                                        <Path.RenderTransform>
                                                            <TransformGroup>
                                                                <ScaleTransform x:Name="SortIconTransform" ScaleX=".9" ScaleY=".9" />
                                                            </TransformGroup>
                                                        </Path.RenderTransform>
                                                    </Path>
                                                </Grid>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </sdk:DataGrid.ColumnHeaderStyle>
                            <sdk:DataGrid.Columns>
                                <sdk:DataGridTextColumn Header="Start" Width="160" IsReadOnly="True" Binding="{Binding Start}" CanUserReorder="False" CanUserResize="True" CanUserSort="True" />
                                <sdk:DataGridTextColumn Header="End" Width="160" IsReadOnly="True" Binding="{Binding End}" CanUserReorder="False" CanUserResize="True" CanUserSort="True"/>
                                <sdk:DataGridTextColumn Header="Interval" Width="80" IsReadOnly="True" Binding="{Binding IntervalName}" CanUserReorder="False" CanUserResize="True" CanUserSort="True"/>
                                <sdk:DataGridTextColumn Header="Price" Width="80" IsReadOnly="True" Binding="{Binding Price}" CanUserReorder="False" CanUserResize="True" CanUserSort="True"/>
                            </sdk:DataGrid.Columns>
                        </sdk:DataGrid>
                        <Button x:Name="btnAddTimePrice" Grid.Row="6" Grid.Column="1" Content="Add" HorizontalAlignment="Left" Margin="10,5,0,0" VerticalAlignment="Top" Width="100" Click="btnAddTimePrice_Click"/>
                        <Button x:Name="btnRemoveTimePrice" Grid.Row="6" Grid.Column="1" Content="Remove" HorizontalAlignment="Left" Margin="120,5,0,0" VerticalAlignment="Top" Width="100" Click="btnRemoveTimePrice_Click"/>
                        <Button x:Name="btnEditTimePrice" Grid.Row="6" Grid.Column="1" Content="Edit" HorizontalAlignment="Left" Margin="230,5,0,0" VerticalAlignment="Top" Width="100" Click="btnEditTimePrice_Click"/>
                    </Grid>
                </StackPanel>
            </sdk:TabItem>
            <sdk:TabItem Header="Option Groups" Height="26" VerticalAlignment="Top">
                <StackPanel Orientation="Vertical" Margin="0,0,0,0">
                    <Grid x:Name="LayoutOption" Margin="2,2,1,7">
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="367*"/>
                        </Grid.ColumnDefinitions>
                        <ComboBox x:Name="cmbOptionGroups" Grid.Row="0" HorizontalAlignment="Left" Margin="10,20,0,0" VerticalAlignment="Top" Width="330" SelectionChanged="cmbOptionGroups_SelectionChanged" Height="27"/>
                        <Button x:Name="btnAddOptionGroup" Grid.Row="1" Content="Add" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="100" Click="btnAddOptionGroup_Click" Height="31"/>
                        <Button x:Name="btnRemoveOptionGroup" Grid.Row="1" Content="Remove" HorizontalAlignment="Left" Margin="120,10,0,0" VerticalAlignment="Top" Width="100" Click="btnRemoveOptionGroup_Click" Height="31"/>
                        <Button x:Name="btnEditOptionGroup" Grid.Row="1" Content="Edit" HorizontalAlignment="Left" Margin="240,10,0,0" VerticalAlignment="Top" Width="100" Click="btnEditOptionGroup_Click" Height="31"/>
                        <ListBox x:Name="lbOptions" Grid.Row="2" HorizontalAlignment="Left" Height="111" Margin="10,10,0,0" VerticalAlignment="Top" Width="330"/>
                        <Button x:Name="btnAddOptionGroupItem" Grid.Row="3" Content="Add" HorizontalAlignment="Left" Margin="10,140,0,0" VerticalAlignment="Top" Width="75" Click="btnAddOptionGroupItem_Click"/>
                        <Button x:Name="btnRemoveOptionGroupItem" Grid.Row="3" Content="Remove" HorizontalAlignment="Left" Margin="100,140,0,0" VerticalAlignment="Top" Width="75" Click="btnRemoveOptionGroupItem_Click"/>
                        <Button x:Name="btnEditOptionGroupItem" Grid.Row="3" Content="Edit" HorizontalAlignment="Left" Margin="190,140,0,0" VerticalAlignment="Top" Width="75" Click="btnEditOptionGroupItem_Click"/>
                    </Grid>
                </StackPanel>
            </sdk:TabItem>
            <sdk:TabItem Header="Units" Height="26" VerticalAlignment="Top">
                <StackPanel Orientation="Vertical" Margin="0,0,0,0">
                    <Grid x:Name="LayoutUnits" Margin="2,2,1,7">
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="180*"/>
                        </Grid.ColumnDefinitions>
                        <ComboBox x:Name="cmbUnits" Grid.Row="0" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="320" Height="27"/>
                        <Button x:Name="btnAddUnits" Content="Add" Grid.Row="1" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="100" RenderTransformOrigin="0.74,0.5" Click="btnAddUnits_Click"/>
                        <Button x:Name="btnRemoveUnits" Content="Remove" Grid.Row="1" HorizontalAlignment="Left" Margin="120,10,0,0" VerticalAlignment="Top" Width="100" Click="btnRemoveUnits_Click"/>
                        <Button x:Name="btnEditUnits" Content="Edit" Grid.Row="1" HorizontalAlignment="Left" Margin="230,10,0,0" VerticalAlignment="Top" Width="100" Click="btnEditUnits_Click"/>
                    </Grid>
                </StackPanel>
            </sdk:TabItem>
            <sdk:TabItem Header="Ingredients" Height="26" VerticalAlignment="Top">
                <StackPanel Orientation="Vertical" Margin="0,0,0,0">
                    <Grid x:Name="LayoutIngredient" Margin="2,2,1,7">
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="180*"/>
                        </Grid.ColumnDefinitions>
                        <ComboBox x:Name="cmbIngredients" Grid.Row="0" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="320" SelectionChanged="cmbIngredients_SelectionChanged"/>
                        <Button x:Name="btnAddIngredient" Grid.Row="1" Content="Add" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="100" Click="btnAddIngredient_Click"/>
                        <Button x:Name="btnRemoveIngredient" Grid.Row="1" Content="Remove" HorizontalAlignment="Left" Margin="120,10,0,0" VerticalAlignment="Top" Width="100" Click="btnRemoveIngredient_Click"/>
                        <Button x:Name="btnEditIngredients" Grid.Row="1" Content="Edit" HorizontalAlignment="Left" Margin="230,10,0,0" VerticalAlignment="Top" Width="100" RenderTransformOrigin="2.9,0.818" Click="btnEditIngredients_Click"/>
                        <sdk:Label x:Name="lblUnitOfMeasure" Grid.Row="2" HorizontalAlignment="Left" Height="18" Margin="10,10,0,0" VerticalAlignment="Top" Width="113" Content="Unit of Measure"/>
                        <ComboBox x:Name="cmbIngredientUnits" Grid.Row="3" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="320"/>
                        <sdk:Label x:Name="lblCostPerUnit" Grid.Row="4" HorizontalAlignment="Left" Height="18" Margin="10,10,0,0" VerticalAlignment="Top" Width="76" Content="Cost Per Unit"/>
                        <TextBox x:Name="tbCostPerUnit" Grid.Row="4" HorizontalAlignment="Left" Height="22" Margin="100,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="55"/>
                        <sdk:Label x:Name="lblCount" Grid.Row="5" HorizontalAlignment="Left" Height="18" Margin="10,10,0,0" VerticalAlignment="Top" Width="33" Content="Count"/>
                        <TextBox x:Name="tbCount" Grid.Row="5" HorizontalAlignment="Left" Height="22" Margin="100,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="55"/>
                        <Button x:Name="btnUpdateIngredients" Grid.Row="6" Content="Update" HorizontalAlignment="Left" Margin="10,40,0,0" VerticalAlignment="Top" Width="67" RenderTransformOrigin="2.9,0.818" Click="btnUpdateIngredients_Click"/>
                    </Grid>
                </StackPanel>
            </sdk:TabItem>
            <sdk:TabItem Header="Recipes" Height="26" VerticalAlignment="Top">
                <StackPanel Orientation="Vertical" Margin="0,0,0,0">
                    <Grid x:Name="LayoutRecipes" Margin="2,2,1,7">
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="220*"/>
                            <ColumnDefinition Width="106*"/>
                        </Grid.ColumnDefinitions>
                        <ComboBox x:Name="cmbRecipes" Grid.Row="0" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="175" SelectionChanged="cmbRecipes_SelectionChanged" Height="34"/>
                        <Button x:Name="btnAddRecipe" Grid.Row="0" Content="Add" HorizontalAlignment="Left" Margin="200,10,0,0" VerticalAlignment="Top" Width="100" Click="btnAddRecipe_Click"/>
                        <Button x:Name="btnRemoveRecipe" Grid.Row="0" Content="Remove" HorizontalAlignment="Left" Margin="310,10,0,0" VerticalAlignment="Top" Width="100" Click="btnRemoveRecipe_Click" Grid.ColumnSpan="2"/>
                        <Button x:Name="btnEditRecipe" Grid.Row="0" Content="Edit" HorizontalAlignment="Left" Margin="420,10,0,0" VerticalAlignment="Top" Width="100" Click="btnEditRecipe_Click"/>
                        <sdk:DataGrid x:Name="dgRecipeItems" Grid.Row="1" AutoGenerateColumns="False" HorizontalAlignment="Left" Height="192" Margin="10,10,0,0" VerticalAlignment="Top" Width="510" Grid.ColumnSpan="2">
                            <sdk:DataGrid.ColumnHeaderStyle>
                                <Style  TargetType="sdk:DataGridColumnHeader" >
                                    <Setter Property="FontSize" Value="10" />
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate>
                                                <Grid Name="Root">
                                                    <VisualStateManager.VisualStateGroups>
                                                        <VisualStateGroup x:Name="CommonStates">
                                                            <VisualStateGroup.Transitions>
                                                                <VisualTransition GeneratedDuration="00:00:0.1" />
                                                            </VisualStateGroup.Transitions>
                                                            <VisualState x:Name="Normal" />
                                                            <VisualState x:Name="MouseOver" />
                                                        </VisualStateGroup>
                                                    </VisualStateManager.VisualStateGroups>
                                                    <Grid.RowDefinitions>
                                                        <RowDefinition Height="*" />
                                                        <RowDefinition Height="*" />
                                                        <RowDefinition Height="Auto" />
                                                    </Grid.RowDefinitions>
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="Auto" />
                                                        <ColumnDefinition Width="*" />
                                                        <ColumnDefinition Width="Auto" />
                                                    </Grid.ColumnDefinitions>

                                                    <Rectangle x:Name="BackgroundRectangle" Stretch="Fill" Fill="#FF1F3B53" Grid.ColumnSpan="2" Grid.RowSpan="2"/>

                                                    <Rectangle x:Name="BackgroundGradient" Stretch="Fill" Grid.ColumnSpan="2" Grid.RowSpan="2">
                                                        <Rectangle.Fill>
                                                            <LinearGradientBrush StartPoint=".7,0" EndPoint=".7,1">
                                                                <GradientStop Color="#FFFFFFFF" Offset="0.015" />
                                                                <GradientStop Color="#F9FFFFFF" Offset="0.375" />
                                                                <GradientStop Color="#E5FFFFFF" Offset="0.6" />
                                                                <GradientStop Color="#C6FFFFFF" Offset="1" />
                                                            </LinearGradientBrush>
                                                        </Rectangle.Fill>
                                                    </Rectangle>

                                                    <ContentPresenter
                        Grid.RowSpan="2"
                        
                        Cursor="{TemplateBinding Cursor}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>

                                                    <Rectangle Name="VerticalSeparator" Grid.RowSpan="2" Grid.Column="2" Width="1" VerticalAlignment="Stretch" />

                                                    <Path Grid.RowSpan="2" Name="SortIcon" RenderTransformOrigin=".5,.5" HorizontalAlignment="Left" VerticalAlignment="Center" Opacity="0" Grid.Column="1" Stretch="Uniform" Width="8" Data="F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z ">
                                                        <Path.Fill>
                                                            <SolidColorBrush Color="#FF444444" />
                                                        </Path.Fill>
                                                        <Path.RenderTransform>
                                                            <TransformGroup>
                                                                <ScaleTransform x:Name="SortIconTransform" ScaleX=".9" ScaleY=".9" />
                                                            </TransformGroup>
                                                        </Path.RenderTransform>
                                                    </Path>

                                                </Grid>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </sdk:DataGrid.ColumnHeaderStyle>
                            <sdk:DataGrid.Columns>
                                <sdk:DataGridTextColumn Header="Ingredient" Width="140" IsReadOnly="True" Binding="{Binding IngredientName}" CanUserReorder="False" CanUserResize="False" CanUserSort="False"/>
                                <sdk:DataGridTextColumn Header="Units" Width="70" IsReadOnly="True" Binding="{Binding UnitName}"/>
                                <sdk:DataGridTextColumn Header="Quantity" Width="50" IsReadOnly="True" Binding="{Binding Quantity}"/>
                            </sdk:DataGrid.Columns>
                        </sdk:DataGrid>
                        <Button x:Name="btnAddRecipeItem" Grid.Row="3" Content="Add" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="100" Click="btnAddRecipeItem_Click"/>
                        <Button x:Name="btnRemoveRecipeItem" Grid.Row="3" Content="Remove" HorizontalAlignment="Left" Margin="120,10,0,0" VerticalAlignment="Top" Width="100" Click="btnRemoveRecipeItem_Click"/>
                        <Button x:Name="btnEditRecipeItem" Grid.Row="3" Content="Edit" HorizontalAlignment="Left" Margin="230,10,0,0" VerticalAlignment="Top" Width="100" Click="btnEditRecipeItem_Click"/>
                    </Grid>
                </StackPanel>
            </sdk:TabItem>
        </sdk:TabControl>
    </Grid>
</navigation:Page>
